/**
 * lua函数
 */
var luaFuncs = {
    getCookie :function () {
        var map = new HashMap();
        map.put("method","getCookie");
        return sendAndReceive(map)
    },

    zx_check_sms :function(){
        var map = new HashMap();
        map.put("method","zx_check_sms");
        return sendAndReceive(map)
    },
    zx_login: function(){
        var map = new HashMap();
        map.put("method","zx_login");
        return sendAndReceive(map)
    },
    get_html_2:function(){
        var map = new HashMap();
        map.put("method","get_html_2");
        return sendAndReceive(map)
    },
    zx_receive_message:function(verifyMessage){
        var map = new HashMap();
        map.put("method","zx_receive_message");
        map.put("smsMessage",verifyMessage);
        return sendAndReceive(map)
    } ,
    zx_check_img:function(){
        var map = new HashMap();
        map.put("method","zx_check_img");
        return sendAndReceive(map)
    },

    zx_send_img:function(code){
        var map = new HashMap();
        map.put("method","zx_send_img");
        map.put("img",code);
        return sendAndReceive(map)
    },
    zx_jumpByUrl:function(url){
        var map = new HashMap();
        map.put("method","zx_jumpByUrl");
        return sendAndReceive(map)
    },
    zx_get_html:function(){
        var map = new HashMap();
        map.put("method","zx_get_html");
        return sendAndReceive(map)
    },

    zx_get_html:function() {
        var map = new LinkedHashMap();
        map.put("method", "zx_get_html");
        return sendAndReceive(map);
    },
    /**
     * 老版-登录 使用keypress、mouseleftclick等方法点击之后输入
     * @param loginTemp
     * @param password
     * @return
     * @author lijian
     */
    zx_input_usernameAndPassword:function (loginTemp, password) {
        var map = new LinkedHashMap();
        map.put("method", "zx_input_usernameAndPassword");
        map.put("loginTemp", loginTemp);
        map.put("password", password);
        return sendAndReceive(map);
    },
    /**
     * 老版本 使用keypress输入验证码  如果为第二次输入，则需要注入js将已经输入的验证码取消掉
     * @param imgCode
     * @return
     */
    zx_input_imgCode:function (imgCode,time) {
        var map = new LinkedHashMap();
        map.put("method", "zx_input_imgCode");
        map.put("imgCode", imgCode);
        map.put("times", time);
        return  sendAndReceive(map);
    },
    /**
     * 老版本-登录之后检查登录是否成功的状态
     * @return
     */
    zx_check_loginStatus:function () {
        var map = new LinkedHashMap ();
        map.put("method", "zx_check_loginStatus");
        return  sendAndReceive(map);
    },

    /**
     * 老版本  -设置短信验证码的值，并且点击登录按钮
     * @return  短信错误-->会有弹出窗口，将弹出窗口的信息完整返回
     * 			短信正确-->lua通过url的变化来确定页面跳转成功 标志为SUCCESS
     */
    zx_input_sms_and_check :function(sms) {
        var map = new LinkedHashMap ();
        map.put("method", "zx_input_sms_and_check");
        map.put("sms", sms);
        return  sendAndReceive(map);
    },

    /**
     * 截取当前屏幕的状态
     * @return
     */
    getScreenShots :function() {
        var map=new LinkedHashMap();
        map.put("method", "getScreenShots");
        return sendAndReceive(map);
    },
    /**
     * 获取文本内容
     */
    getInnerHTML:function(id){
        var map=new LinkedHashMap();
        map.put("method", "getInnerHTML");
        map.put("id",id);
        return sendAndReceive(map);
    },

    /**
     * 清空文本内容
     */
    clearInnerHTML:function(id){
        var map=new LinkedHashMap();
        map.put("method", "clearInnerHTML");
        map.put("id",id);
        return sendAndReceive(map);
    }
}